// 创建RDD并转换,成绩转化为Int类型
val math = sc.textFile("file:///F:/student/result_math.txt")
val m_math = math.map{x=> val line=x.split(" ");(line(0),line(1),line(2).toInt)}
val bigdata = sc.textFile("file:///F:/student/result_bigdata.txt")
val m_bigdata = bigdata.map{x=>val line=x.split(" ");(line(0),line(1),line(2).toInt)}

// 通过filter操作过滤出成绩为100分的学生数据
val student_100 = m_math.filter(_._3 == 100).union(m_bigdata.filter(_._3 == 100))

// 通过union操作合并所有ID并利用distinct操作去重，得到成绩为100分的学生ID
val result = student_100.map(_._1).distinct
val resultArray = result.collect
println(resultArray.mkString(","))